package com.yd.controller.app;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.yd.pojo.Abts;
import com.yd.service.AbtsService;
import com.yd.tool.UtsReg;

@Controller
public class AbtsControllerApp {
	@Resource
	private AbtsService abtsService;
	
	@RequestMapping(value = { "/app/abts/show"})
	@ResponseBody
	public String app_abts_list(HttpServletRequest request) {
		JSONObject jsonObject = new JSONObject();  
		
		String tid="";
		
		if(UtsReg.getIntXl(request.getParameter("tid"))){
			tid=request.getParameter("tid").trim();
		}
		
		EntityWrapper<Abts> ew=new EntityWrapper<Abts>();
		Abts abts = abtsService.selectOne(ew.eq("tid", tid));
		
		jsonObject.put("data", abts);
		jsonObject.put("error", "0");
		jsonObject.put("msg", "成功");

		return jsonObject.toString();
	}
	
	
	
}
